<?php
namespace Users\Model;

class Payments
{
	public $sno;
	public $account;
	public $txnid;	
	public $payment_amount;
	public $payment_status;	
	public $itemid;
	public $createdtime;

	public function exchangeArray($data)
	{
		$this->sno					= (isset($data['sno']))			? $data['sno']     																	   : null;
        $this->account 				= (isset($data['account'])) 	? $data['account'] 																		 : null;
		$this->txnid 				= (isset($data['txnid'])) 		? $data['txnid'] 																		  : null;
		$this->payment_amount  		= (isset($data['payment_amount'])) ? $data['payment_amount']  																   	   : null;
		$this->payment_status  	    = (isset($data['payment_status'])) ? $data['payment_status']  																		: null;
		$this->itemid  				= (isset($data['itemid']))  		? $data['itemid']  																		: null;
		$this->createdtime  		= (isset($data['createdtime']))  	? $data['createdtime']  : null;
	}
	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}